package io.github.handyang.algorithms.graph;

import lombok.extern.slf4j.Slf4j;
import org.junit.Test;

@Slf4j
public class SearchTest {

    @Test
    public void QuickUnionTest() {
        QuickUnionSearch search = new QuickUnionSearch(5);
        search.mark(0, 1);
        search.mark(0, 2);
        search.mark(0, 3);
//        search.mark(0, 4);

        log.info("1 <-> 2:{}", search.marked(1, 2));
        log.info("2 <-> 1:{}", search.marked(2, 1));
        log.info("3 <-> 4:{}", search.marked(3, 4));
    }

}
